<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
{$sCreateJs}
<form method="post" action="{url link='marketplace.add'}" enctype="multipart/form-data" id="js_marketplace_form" onsubmit="return {$sGetJsForm};">
    {if $bIsEdit}
    <div><input type="hidden" name="id" value="{$aForms.listing_id}" /></div>
    {/if}

    <div id="js_custom_privacy_input_holder">
        {if $bIsEdit && Phpfox::isModule('privacy')}
        {module name='privacy.build' privacy_item_id=$aForms.listing_id privacy_module_id='marketplace'}
        {/if}
    </div>	

    <div><input type="hidden" name="page_section_menu" value="" id="page_section_menu_form" /></div>

    <div id="js_mp_block_detail" class="js_mp_block page_section_menu_holder">
        <div id="open_store_step_info">
            <div class="table">
                <input type="text" placeholder="{phrase var='marketplace.what_are_you_selling'}" name="val[title]" value="{value type='input' id='title'}" id="title" style="width: 515px;" />
            </div>	
            <div class="table">
                <textarea placeholder="{phrase var='marketplace.description'}" cols="40" rows="5" style="width: 515px;" name="val[description]">{value type='textarea' id='description'}</textarea>
            </div>	
            <div class="table">			
                <select name="val[currency_id]">
                    {foreach from=$aCurrencies key=sCurrency item=aCurrency}
                    <option value="{$sCurrency}"{if $bIsEdit} {value type='select' id='currency_id' default=$sCurrency}{else}{if $aCurrency.is_default} selected="selected"{/if}{/if}>{phrase var=$aCurrency.name}</option>
                    {/foreach}
                </select>
                <input type="text" placeholder="{phrase var='marketplace.price'}" name="val[price]" value="{value type='input' id='price'}" id="price" size="10" maxlength="100" onfocus="this.select();" style="width: 415px;" />			
            </div>
            <div class="table">
                    {$sCategories}
            </div>
            <div class="store_feature_link">
                <ul>
                    <li>
                                              
                        <a href="#" onclick="$('#targeting_customer').toggle();return false;"><span class="tab_icon image_target_customer">{img theme='user.png'}</span>Target customer</a>
                        <div id="targeting_customer" style="display: none;">
							<div class="beeperNub"></div>
                            <div class="targeting_customer_header">
                                Target Customers  <input onclick="$('#targeting_customer').toggle();return false;" type="button" class="button" value="Done"/>
                            </div>
                            <div>
                                <span>Gender:</span> {select_gender}
                            </div>
                            <div>
                                <span>Age:</span> 
                                <select name="val[target_age_from]">
                                    <option value="">Select</option>
                                    <option value="20">20</option>
                                    <option value="30">30</option>
                                    <option value="40">40</option>
                                    <option value="50">50</option>
                                </select>
                                 To <select name="val[target_age_to]">
                                    <option value="">Select</option>
                                    <option value="20">20</option>
                                    <option value="30">30</option>
                                    <option value="40">40</option>
                                    <option value="50">50</option>
                                </select>
                            </div>
                            <div>
                                <span>Interest in:</span>
                                <select id="interest" name="val[target_interest_in]">
                                    <option value="">Select</option>
                                    <option value="1">Social</option>
                                </select>
                            </div>
                        </div>
                    </li>
                    <li>
                                                
                        <a href="#" onclick="$('#listing_photo').show();return false;"><span class="tab_icon image_photo">{img theme='photo.png'}</span>Photo</a>
                    </li>
                    <li>
                                                
                        <a href="#" onclick="$('#listing_video').show();return false;"><span class="tab_icon image_video">{img theme='video.png'}</span>Video</a>
                    </li>
                    <!--<li>
                                                
                        <a href="#" onclick="$('#listing_map').show();return false;"><span class="tab_icon image_map">{img theme='map.png'}</span>Map</a>
                    </li>-->
                </ul>
                <div class="clear"></div>
                
            </div>
            <div class="store_feature_content" >
                    
                   <div id="listing_photo" style="display: none;">
                        {template file='marketplace.block.media.photoform'}
                        <div class="separate_to_border"></div>
                    </div>
                    <div id="listing_video" style="display: none;">
                    
                        {template file='marketplace.block.media.videoform'}
                        <div class="separate_to_border"></div>
                    </div>  
                    <div id="listing_map" style="display: none;">
                    
                        {template file='marketplace.block.media.mapform'}
                    </div>
                 </div>
            <div class="table break_line">          
                <div class="table_left">
                    Store information
                </div>
                <div class="table_right">
                    <select name="val[store_id]" id="store_id">
                        {foreach from=$aStores item=aStore}
                        <option value="{$aStore.store_id}">{$aStore.name}</option>
                        {/foreach}
                        <option value="">Open new store</option>
                    </select>
                </div>
            </div>
            
            <input type="hidden" id="privacy" name="val[privacy]" value="0">
            <input type="hidden" id="privacy_comment" name="val[privacy_comment]" value="0">
        </div>   
        <div id="open_store_step_store_data" style="display: none;">
            {template file='marketplace.block.store.field'}            
        </div>
        <div class="btns_padding table_clear">
            <input type="submit" onclick="return openStore();" value="{if $bIsEdit}{phrase var='marketplace.update'}{else}{phrase var='marketplace.submit'}{/if}" class="button open_store" />
            <input type="submit" value="Cancel" onclick="tb_remove();return false;" class="button open_store_cancel" />
        </div>
    </div>	
    
</form>